home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 6 / CU Amiga Magazine's Super CD-ROM 06 (1996)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-01].iso / cucd / prog / gnu-c / src / gcc-2.7.0-amiga / gcc.info-16 (.txt) < prev    next >
GNU Info File  |  1995-06-16  |  34KB  |  727 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.55 from the input
  2. file gcc.texi.
  3.    This file documents the use and the internals of the GNU compiler.
  4.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  5. Boston, MA 02111-1307 USA
  6.    Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995 Free Software
  7. Foundation, Inc.
  8.    Permission is granted to make and distribute verbatim copies of this
  9. manual provided the copyright notice and this permission notice are
  10. preserved on all copies.
  11.    Permission is granted to copy and distribute modified versions of
  12. this manual under the conditions for verbatim copying, provided also
  13. that the sections entitled "GNU General Public License," "Funding for
  14. Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are
  15. included exactly as in the original, and provided that the entire
  16. resulting derived work is distributed under the terms of a permission
  17. notice identical to this one.
  18.    Permission is granted to copy and distribute translations of this
  19. manual into another language, under the above conditions for modified
  20. versions, except that the sections entitled "GNU General Public
  21. License," "Funding for Free Software," and "Protect Your Freedom--Fight
  22. `Look And Feel'", and this permission notice, may be included in
  23. translations approved by the Free Software Foundation instead of in the
  24. original English.
  25. File: gcc.info,  Node: Output Statement,  Next: Constraints,  Prev: Output Template,  Up: Machine Desc
  26. C Statements for Assembler Output
  27. =================================
  28.    Often a single fixed template string cannot produce correct and
  29. efficient assembler code for all the cases that are recognized by a
  30. single instruction pattern.  For example, the opcodes may depend on the
  31. kinds of operands; or some unfortunate combinations of operands may
  32. require extra machine instructions.
  33.    If the output control string starts with a `@', then it is actually
  34. a series of templates, each on a separate line.  (Blank lines and
  35. leading spaces and tabs are ignored.)  The templates correspond to the
  36. pattern's constraint alternatives (*note Multi-Alternative::.).  For
  37. example, if a target machine has a two-address add instruction `addr'
  38. to add into a register and another `addm' to add a register to memory,
  39. you might write this pattern:
  40.      (define_insn "addsi3"
  41.        [(set (match_operand:SI 0 "general_operand" "=r,m")
  42.              (plus:SI (match_operand:SI 1 "general_operand" "0,0")
  43.                       (match_operand:SI 2 "general_operand" "g,r")))]
  44.        ""
  45.        "@
  46.         addr %2,%0
  47.         addm %2,%0")
  48.    If the output control string starts with a `*', then it is not an
  49. output template but rather a piece of C program that should compute a
  50. template.  It should execute a `return' statement to return the
  51. template-string you want.  Most such templates use C string literals,
  52. which require doublequote characters to delimit them.  To include these
  53. doublequote characters in the string, prefix each one with `\'.
  54.    The operands may be found in the array `operands', whose C data type
  55. is `rtx []'.
  56.    It is very common to select different ways of generating assembler
  57. code based on whether an immediate operand is within a certain range.
  58. Be careful when doing this, because the result of `INTVAL' is an
  59. integer on the host machine.  If the host machine has more bits in an
  60. `int' than the target machine has in the mode in which the constant
  61. will be used, then some of the bits you get from `INTVAL' will be
  62. superfluous.  For proper results, you must carefully disregard the
  63. values of those bits.
  64.    It is possible to output an assembler instruction and then go on to
  65. output or compute more of them, using the subroutine `output_asm_insn'.
  66. This receives two arguments: a template-string and a vector of
  67. operands.  The vector may be `operands', or it may be another array of
  68. `rtx' that you declare locally and initialize yourself.
  69.    When an insn pattern has multiple alternatives in its constraints,
  70. often the appearance of the assembler code is determined mostly by
  71. which alternative was matched.  When this is so, the C code can test
  72. the variable `which_alternative', which is the ordinal number of the
  73. alternative that was actually satisfied (0 for the first, 1 for the
  74. second alternative, etc.).
  75.    For example, suppose there are two opcodes for storing zero, `clrreg'
  76. for registers and `clrmem' for memory locations.  Here is how a pattern
  77. could use `which_alternative' to choose between them:
  78.      (define_insn ""
  79.        [(set (match_operand:SI 0 "general_operand" "=r,m")
  80.              (const_int 0))]
  81.        ""
  82.        "*
  83.        return (which_alternative == 0
  84.                ? \"clrreg %0\" : \"clrmem %0\");
  85.        ")
  86.    The example above, where the assembler code to generate was *solely*
  87. determined by the alternative, could also have been specified as
  88. follows, having the output control string start with a `@':
  89.      (define_insn ""
  90.        [(set (match_operand:SI 0 "general_operand" "=r,m")
  91.              (const_int 0))]
  92.        ""
  93.        "@
  94.         clrreg %0
  95.         clrmem %0")
  96. File: gcc.info,  Node: Constraints,  Next: Standard Names,  Prev: Output Statement,  Up: Machine Desc
  97. Operand Constraints
  98. ===================
  99.    Each `match_operand' in an instruction pattern can specify a
  100. constraint for the type of operands allowed.  Constraints can say
  101. whether an operand may be in a register, and which kinds of register;
  102. whether the operand can be a memory reference, and which kinds of
  103. address; whether the operand may be an immediate constant, and which
  104. possible values it may have.  Constraints can also require two operands
  105. to match.
  106. * Menu:
  107. * Simple Constraints::  Basic use of constraints.
  108. * Multi-Alternative::   When an insn has two alternative constraint-patterns.
  109. * Class Preferences::   Constraints guide which hard register to put things in.
  110. * Modifiers::           More precise control over effects of constraints.
  111. * Machine Constraints:: Existing constraints for some particular machines.
  112. * No Constraints::      Describing a clean machine without constraints.
  113. File: gcc.info,  Node: Simple Constraints,  Next: Multi-Alternative,  Up: Constraints
  114. Simple Constraints
  115. ------------------
  116.    The simplest kind of constraint is a string full of letters, each of
  117. which describes one kind of operand that is permitted.  Here are the
  118. letters that are allowed:
  119.      A memory operand is allowed, with any kind of address that the
  120.      machine supports in general.
  121.      A memory operand is allowed, but only if the address is
  122.      "offsettable".  This means that adding a small integer (actually,
  123.      the width in bytes of the operand, as determined by its machine
  124.      mode) may be added to the address and the result is also a valid
  125.      memory address.
  126.      For example, an address which is constant is offsettable; so is an
  127.      address that is the sum of a register and a constant (as long as a
  128.      slightly larger constant is also within the range of
  129.      address-offsets supported by the machine); but an autoincrement or
  130.      autodecrement address is not offsettable.  More complicated
  131.      indirect/indexed addresses may or may not be offsettable depending
  132.      on the other addressing modes that the machine supports.
  133.      Note that in an output operand which can be matched by another
  134.      operand, the constraint letter `o' is valid only when accompanied
  135.      by both `<' (if the target machine has predecrement addressing)
  136.      and `>' (if the target machine has preincrement addressing).
  137.      A memory operand that is not offsettable.  In other words,
  138.      anything that would fit the `m' constraint but not the `o'
  139.      constraint.
  140.      A memory operand with autodecrement addressing (either
  141.      predecrement or postdecrement) is allowed.
  142.      A memory operand with autoincrement addressing (either
  143.      preincrement or postincrement) is allowed.
  144.      A register operand is allowed provided that it is in a general
  145.      register.
  146. `d', `a', `f', ...
  147.      Other letters can be defined in machine-dependent fashion to stand
  148.      for particular classes of registers.  `d', `a' and `f' are defined
  149.      on the 68000/68020 to stand for data, address and floating point
  150.      registers.
  151.      An immediate integer operand (one with constant value) is allowed.
  152.      This includes symbolic constants whose values will be known only at
  153.      assembly time.
  154.      An immediate integer operand with a known numeric value is allowed.
  155.      Many systems cannot support assembly-time constants for operands
  156.      less than a word wide.  Constraints for these operands should use
  157.      `n' rather than `i'.
  158. `I', `J', `K', ... `P'
  159.      Other letters in the range `I' through `P' may be defined in a
  160.      machine-dependent fashion to permit immediate integer operands with
  161.      explicit integer values in specified ranges.  For example, on the
  162.      68000, `I' is defined to stand for the range of values 1 to 8.
  163.      This is the range permitted as a shift count in the shift
  164.      instructions.
  165.      An immediate floating operand (expression code `const_double') is
  166.      allowed, but only if the target floating point format is the same
  167.      as that of the host machine (on which the compiler is running).
  168.      An immediate floating operand (expression code `const_double') is
  169.      allowed.
  170. `G', `H'
  171.      `G' and `H' may be defined in a machine-dependent fashion to
  172.      permit immediate floating operands in particular ranges of values.
  173.      An immediate integer operand whose value is not an explicit
  174.      integer is allowed.
  175.      This might appear strange; if an insn allows a constant operand
  176.      with a value not known at compile time, it certainly must allow
  177.      any known value.  So why use `s' instead of `i'?  Sometimes it
  178.      allows better code to be generated.
  179.      For example, on the 68000 in a fullword instruction it is possible
  180.      to use an immediate operand; but if the immediate value is between
  181.      -128 and 127, better code results from loading the value into a
  182.      register and using the register.  This is because the load into
  183.      the register can be done with a `moveq' instruction.  We arrange
  184.      for this to happen by defining the letter `K' to mean "any integer
  185.      outside the range -128 to 127", and then specifying `Ks' in the
  186.      operand constraints.
  187.      Any register, memory or immediate integer operand is allowed,
  188.      except for registers that are not general registers.
  189.      Any operand whatsoever is allowed, even if it does not satisfy
  190.      `general_operand'.  This is normally used in the constraint of a
  191.      `match_scratch' when certain alternatives will not actually
  192.      require a scratch register.
  193. `0', `1', `2', ... `9'
  194.      An operand that matches the specified operand number is allowed.
  195.      If a digit is used together with letters within the same
  196.      alternative, the digit should come last.
  197.      This is called a "matching constraint" and what it really means is
  198.      that the assembler has only a single operand that fills two roles
  199.      considered separate in the RTL insn.  For example, an add insn has
  200.      two input operands and one output operand in the RTL, but on most
  201.      CISC machines an add instruction really has only two operands, one
  202.      of them an input-output operand:
  203.           addl #35,r12
  204.      Matching constraints are used in these circumstances.  More
  205.      precisely, the two operands that match must include one input-only
  206.      operand and one output-only operand.  Moreover, the digit must be a
  207.      smaller number than the number of the operand that uses it in the
  208.      constraint.
  209.      For operands to match in a particular case usually means that they
  210.      are identical-looking RTL expressions.  But in a few special cases
  211.      specific kinds of dissimilarity are allowed.  For example, `*x' as
  212.      an input operand will match `*x++' as an output operand.  For
  213.      proper results in such cases, the output template should always
  214.      use the output-operand's number when printing the operand.
  215.      An operand that is a valid memory address is allowed.  This is for
  216.      "load address" and "push address" instructions.
  217.      `p' in the constraint must be accompanied by `address_operand' as
  218.      the predicate in the `match_operand'.  This predicate interprets
  219.      the mode specified in the `match_operand' as the mode of the memory
  220.      reference for which the address would be valid.
  221. `Q', `R', `S', ... `U'
  222.      Letters in the range `Q' through `U' may be defined in a
  223.      machine-dependent fashion to stand for arbitrary operand types.
  224.      The machine description macro `EXTRA_CONSTRAINT' is passed the
  225.      operand as its first argument and the constraint letter as its
  226.      second operand.
  227.      A typical use for this would be to distinguish certain types of
  228.      memory references that affect other insn operands.
  229.      Do not define these constraint letters to accept register
  230.      references (`reg'); the reload pass does not expect this and would
  231.      not handle it properly.
  232.    In order to have valid assembler code, each operand must satisfy its
  233. constraint.  But a failure to do so does not prevent the pattern from
  234. applying to an insn.  Instead, it directs the compiler to modify the
  235. code so that the constraint will be satisfied.  Usually this is done by
  236. copying an operand into a register.
  237.    Contrast, therefore, the two instruction patterns that follow:
  238.      (define_insn ""
  239.        [(set (match_operand:SI 0 "general_operand" "=r")
  240.              (plus:SI (match_dup 0)
  241.                       (match_operand:SI 1 "general_operand" "r")))]
  242.        ""
  243.        "...")
  244. which has two operands, one of which must appear in two places, and
  245.      (define_insn ""
  246.        [(set (match_operand:SI 0 "general_operand" "=r")
  247.              (plus:SI (match_operand:SI 1 "general_operand" "0")
  248.                       (match_operand:SI 2 "general_operand" "r")))]
  249.        ""
  250.        "...")
  251. which has three operands, two of which are required by a constraint to
  252. be identical.  If we are considering an insn of the form
  253.      (insn N PREV NEXT
  254.        (set (reg:SI 3)
  255.             (plus:SI (reg:SI 6) (reg:SI 109)))
  256.        ...)
  257. the first pattern would not apply at all, because this insn does not
  258. contain two identical subexpressions in the right place.  The pattern
  259. would say, "That does not look like an add instruction; try other
  260. patterns." The second pattern would say, "Yes, that's an add
  261. instruction, but there is something wrong with it."  It would direct
  262. the reload pass of the compiler to generate additional insns to make
  263. the constraint true.  The results might look like this:
  264.      (insn N2 PREV N
  265.        (set (reg:SI 3) (reg:SI 6))
  266.        ...)
  267.      
  268.      (insn N N2 NEXT
  269.        (set (reg:SI 3)
  270.             (plus:SI (reg:SI 3) (reg:SI 109)))
  271.        ...)
  272.    It is up to you to make sure that each operand, in each pattern, has
  273. constraints that can handle any RTL expression that could be present for
  274. that operand.  (When multiple alternatives are in use, each pattern
  275. must, for each possible combination of operand expressions, have at
  276. least one alternative which can handle that combination of operands.)
  277. The constraints don't need to *allow* any possible operand--when this is
  278. the case, they do not constrain--but they must at least point the way to
  279. reloading any possible operand so that it will fit.
  280.    * If the constraint accepts whatever operands the predicate permits,
  281.      there is no problem: reloading is never necessary for this operand.
  282.      For example, an operand whose constraints permit everything except
  283.      registers is safe provided its predicate rejects registers.
  284.      An operand whose predicate accepts only constant values is safe
  285.      provided its constraints include the letter `i'.  If any possible
  286.      constant value is accepted, then nothing less than `i' will do; if
  287.      the predicate is more selective, then the constraints may also be
  288.      more selective.
  289.    * Any operand expression can be reloaded by copying it into a
  290.      register.  So if an operand's constraints allow some kind of
  291.      register, it is certain to be safe.  It need not permit all
  292.      classes of registers; the compiler knows how to copy a register
  293.      into another register of the proper class in order to make an
  294.      instruction valid.
  295.    * A nonoffsettable memory reference can be reloaded by copying the
  296.      address into a register.  So if the constraint uses the letter
  297.      `o', all memory references are taken care of.
  298.    * A constant operand can be reloaded by allocating space in memory to
  299.      hold it as preinitialized data.  Then the memory reference can be
  300.      used in place of the constant.  So if the constraint uses the
  301.      letters `o' or `m', constant operands are not a problem.
  302.    * If the constraint permits a constant and a pseudo register used in
  303.      an insn was not allocated to a hard register and is equivalent to
  304.      a constant, the register will be replaced with the constant.  If
  305.      the predicate does not permit a constant and the insn is
  306.      re-recognized for some reason, the compiler will crash.  Thus the
  307.      predicate must always recognize any objects allowed by the
  308.      constraint.
  309.    If the operand's predicate can recognize registers, but the
  310. constraint does not permit them, it can make the compiler crash.  When
  311. this operand happens to be a register, the reload pass will be stymied,
  312. because it does not know how to copy a register temporarily into memory.
  313. File: gcc.info,  Node: Multi-Alternative,  Next: Class Preferences,  Prev: Simple Constraints,  Up: Constraints
  314. Multiple Alternative Constraints
  315. --------------------------------
  316.    Sometimes a single instruction has multiple alternative sets of
  317. possible operands.  For example, on the 68000, a logical-or instruction
  318. can combine register or an immediate value into memory, or it can
  319. combine any kind of operand into a register; but it cannot combine one
  320. memory location into another.
  321.    These constraints are represented as multiple alternatives.  An
  322. alternative can be described by a series of letters for each operand.
  323. The overall constraint for an operand is made from the letters for this
  324. operand from the first alternative, a comma, the letters for this
  325. operand from the second alternative, a comma, and so on until the last
  326. alternative.  Here is how it is done for fullword logical-or on the
  327. 68000:
  328.      (define_insn "iorsi3"
  329.        [(set (match_operand:SI 0 "general_operand" "=m,d")
  330.              (ior:SI (match_operand:SI 1 "general_operand" "%0,0")
  331.                      (match_operand:SI 2 "general_operand" "dKs,dmKs")))]
  332.        ...)
  333.    The first alternative has `m' (memory) for operand 0, `0' for
  334. operand 1 (meaning it must match operand 0), and `dKs' for operand 2.
  335. The second alternative has `d' (data register) for operand 0, `0' for
  336. operand 1, and `dmKs' for operand 2.  The `=' and `%' in the
  337. constraints apply to all the alternatives; their meaning is explained
  338. in the next section (*note Class Preferences::.).
  339.    If all the operands fit any one alternative, the instruction is
  340. valid.  Otherwise, for each alternative, the compiler counts how many
  341. instructions must be added to copy the operands so that that
  342. alternative applies.  The alternative requiring the least copying is
  343. chosen.  If two alternatives need the same amount of copying, the one
  344. that comes first is chosen.  These choices can be altered with the `?'
  345. and `!' characters:
  346.      Disparage slightly the alternative that the `?' appears in, as a
  347.      choice when no alternative applies exactly.  The compiler regards
  348.      this alternative as one unit more costly for each `?' that appears
  349.      in it.
  350.      Disparage severely the alternative that the `!' appears in.  This
  351.      alternative can still be used if it fits without reloading, but if
  352.      reloading is needed, some other alternative will be used.
  353.    When an insn pattern has multiple alternatives in its constraints,
  354. often the appearance of the assembler code is determined mostly by which
  355. alternative was matched.  When this is so, the C code for writing the
  356. assembler code can use the variable `which_alternative', which is the
  357. ordinal number of the alternative that was actually satisfied (0 for
  358. the first, 1 for the second alternative, etc.).  *Note Output
  359. Statement::.
  360. File: gcc.info,  Node: Class Preferences,  Next: Modifiers,  Prev: Multi-Alternative,  Up: Constraints
  361. Register Class Preferences
  362. --------------------------
  363.    The operand constraints have another function: they enable the
  364. compiler to decide which kind of hardware register a pseudo register is
  365. best allocated to.  The compiler examines the constraints that apply to
  366. the insns that use the pseudo register, looking for the
  367. machine-dependent letters such as `d' and `a' that specify classes of
  368. registers.  The pseudo register is put in whichever class gets the most
  369. "votes".  The constraint letters `g' and `r' also vote: they vote in
  370. favor of a general register.  The machine description says which
  371. registers are considered general.
  372.    Of course, on some machines all registers are equivalent, and no
  373. register classes are defined.  Then none of this complexity is relevant.
  374. File: gcc.info,  Node: Modifiers,  Next: Machine Constraints,  Prev: Class Preferences,  Up: Constraints
  375. Constraint Modifier Characters
  376. ------------------------------
  377.    Here are constraint modifier characters.
  378.      Means that this operand is write-only for this instruction: the
  379.      previous value is discarded and replaced by output data.
  380.      Means that this operand is both read and written by the
  381.      instruction.
  382.      When the compiler fixes up the operands to satisfy the constraints,
  383.      it needs to know which operands are inputs to the instruction and
  384.      which are outputs from it.  `=' identifies an output; `+'
  385.      identifies an operand that is both input and output; all other
  386.      operands are assumed to be input only.
  387.      Means (in a particular alternative) that this operand is written
  388.      before the instruction is finished using the input operands.
  389.      Therefore, this operand may not lie in a register that is used as
  390.      an input operand or as part of any memory address.
  391.      `&' applies only to the alternative in which it is written.  In
  392.      constraints with multiple alternatives, sometimes one alternative
  393.      requires `&' while others do not.  See, for example, the `movdf'
  394.      insn of the 68000.
  395.      `&' does not obviate the need to write `='.
  396.      Declares the instruction to be commutative for this operand and the
  397.      following operand.  This means that the compiler may interchange
  398.      the two operands if that is the cheapest way to make all operands
  399.      fit the constraints.  This is often used in patterns for addition
  400.      instructions that really have only two operands: the result must
  401.      go in one of the arguments.  Here for example, is how the 68000
  402.      halfword-add instruction is defined:
  403.           (define_insn "addhi3"
  404.             [(set (match_operand:HI 0 "general_operand" "=m,r")
  405.                (plus:HI (match_operand:HI 1 "general_operand" "%0,0")
  406.                         (match_operand:HI 2 "general_operand" "di,g")))]
  407.             ...)
  408.      Says that all following characters, up to the next comma, are to be
  409.      ignored as a constraint.  They are significant only for choosing
  410.      register preferences.
  411.      Says that the following character should be ignored when choosing
  412.      register preferences.  `*' has no effect on the meaning of the
  413.      constraint as a constraint, and no effect on reloading.
  414.      Here is an example: the 68000 has an instruction to sign-extend a
  415.      halfword in a data register, and can also sign-extend a value by
  416.      copying it into an address register.  While either kind of
  417.      register is acceptable, the constraints on an address-register
  418.      destination are less strict, so it is best if register allocation
  419.      makes an address register its goal.  Therefore, `*' is used so
  420.      that the `d' constraint letter (for data register) is ignored when
  421.      computing register preferences.
  422.           (define_insn "extendhisi2"
  423.             [(set (match_operand:SI 0 "general_operand" "=*d,a")
  424.                   (sign_extend:SI
  425.                    (match_operand:HI 1 "general_operand" "0,g")))]
  426.             ...)
  427. File: gcc.info,  Node: Machine Constraints,  Next: No Constraints,  Prev: Modifiers,  Up: Constraints
  428. Constraints for Particular Machines
  429. -----------------------------------
  430.    Whenever possible, you should use the general-purpose constraint
  431. letters in `asm' arguments, since they will convey meaning more readily
  432. to people reading your code.  Failing that, use the constraint letters
  433. that usually have very similar meanings across architectures.  The most
  434. commonly used constraints are `m' and `r' (for memory and
  435. general-purpose registers respectively; *note Simple Constraints::.),
  436. and `I', usually the letter indicating the most common
  437. immediate-constant format.
  438.    For each machine architecture, the `config/MACHINE.h' file defines
  439. additional constraints.  These constraints are used by the compiler
  440. itself for instruction generation, as well as for `asm' statements;
  441. therefore, some of the constraints are not particularly interesting for
  442. `asm'.  The constraints are defined through these macros:
  443. `REG_CLASS_FROM_LETTER'
  444.      Register class constraints (usually lower case).
  445. `CONST_OK_FOR_LETTER_P'
  446.      Immediate constant constraints, for non-floating point constants of
  447.      word size or smaller precision (usually upper case).
  448. `CONST_DOUBLE_OK_FOR_LETTER_P'
  449.      Immediate constant constraints, for all floating point constants
  450.      and for constants of greater than word size precision (usually
  451.      upper case).
  452. `EXTRA_CONSTRAINT'
  453.      Special cases of registers or memory.  This macro is not required,
  454.      and is only defined for some machines.
  455.    Inspecting these macro definitions in the compiler source for your
  456. machine is the best way to be certain you have the right constraints.
  457. However, here is a summary of the machine-dependent constraints
  458. available on some particular machines.
  459. *ARM family--`arm.h'*
  460.     `f'
  461.           Floating-point register
  462.     `F'
  463.           One of the floating-point constants 0.0, 0.5, 1.0, 2.0, 3.0,
  464.           4.0, 5.0 or 10.0
  465.     `G'
  466.           Floating-point constant that would satisfy the constraint `F'
  467.           if it were negated
  468.     `I'
  469.           Integer that is valid as an immediate operand in a data
  470.           processing instruction.  That is, an integer in the range 0
  471.           to 255 rotated by a multiple of 2
  472.     `J'
  473.           Integer in the range -4095 to 4095
  474.     `K'
  475.           Integer that satisfies constraint `I' when inverted (ones
  476.           complement)
  477.     `L'
  478.           Integer that satisfies constraint `I' when negated (twos
  479.           complement)
  480.     `M'
  481.           Integer in the range 0 to 32
  482.     `Q'
  483.           A memory reference where the exact address is in a single
  484.           register (``m'' is preferable for `asm' statements)
  485.     `R'
  486.           An item in the constant pool
  487.     `S'
  488.           A symbol in the text segment of the current file
  489. *AMD 29000 family--`a29k.h'*
  490.     `l'
  491.           Local register 0
  492.     `b'
  493.           Byte Pointer (`BP') register
  494.     `q'
  495.           `Q' register
  496.     `h'
  497.           Special purpose register
  498.     `A'
  499.           First accumulator register
  500.     `a'
  501.           Other accumulator register
  502.     `f'
  503.           Floating point register
  504.     `I'
  505.           Constant greater than 0, less than 0x100
  506.     `J'
  507.           Constant greater than 0, less than 0x10000
  508.     `K'
  509.           Constant whose high 24 bits are on (1)
  510.     `L'
  511.           16 bit constant whose high 8 bits are on (1)
  512.     `M'
  513.           32 bit constant whose high 16 bits are on (1)
  514.     `N'
  515.           32 bit negative constant that fits in 8 bits
  516.     `O'
  517.           The constant 0x80000000 or, on the 29050, any 32 bit constant
  518.           whose low 16 bits are 0.
  519.     `P'
  520.           16 bit negative constant that fits in 8 bits
  521.     `G'
  522.     `H'
  523.           A floating point constant (in `asm' statements, use the
  524.           machine independent `E' or `F' instead)
  525. *IBM RS6000--`rs6000.h'*
  526.     `b'
  527.           Address base register
  528.     `f'
  529.           Floating point register
  530.     `h'
  531.           `MQ', `CTR', or `LINK' register
  532.     `q'
  533.           `MQ' register
  534.     `c'
  535.           `CTR' register
  536.     `l'
  537.           `LINK' register
  538.     `x'
  539.           `CR' register (condition register) number 0
  540.     `y'
  541.           `CR' register (condition register)
  542.     `I'
  543.           Signed 16 bit constant
  544.     `J'
  545.           Constant whose low 16 bits are 0
  546.     `K'
  547.           Constant whose high 16 bits are 0
  548.     `L'
  549.           Constant suitable as a mask operand
  550.     `M'
  551.           Constant larger than 31
  552.     `N'
  553.           Exact power of 2
  554.     `O'
  555.           Zero
  556.     `P'
  557.           Constant whose negation is a signed 16 bit constant
  558.     `G'
  559.           Floating point constant that can be loaded into a register
  560.           with one instruction per word
  561.     `Q'
  562.           Memory operand that is an offset from a register (`m' is
  563.           preferable for `asm' statements)
  564. *Intel 386--`i386.h'*
  565.     `q'
  566.           `a', `b', `c', or `d' register
  567.     `A'
  568.           `a', or `d' register (for 64-bit ints)
  569.     `f'
  570.           Floating point register
  571.     `t'
  572.           First (top of stack) floating point register
  573.     `u'
  574.           Second floating point register
  575.     `a'
  576.           `a' register
  577.     `b'
  578.           `b' register
  579.     `c'
  580.           `c' register
  581.     `d'
  582.           `d' register
  583.     `D'
  584.           `di' register
  585.     `S'
  586.           `si' register
  587.     `I'
  588.           Constant in range 0 to 31 (for 32 bit shifts)
  589.     `J'
  590.           Constant in range 0 to 63 (for 64 bit shifts)
  591.     `K'
  592.           `0xff'
  593.     `L'
  594.           `0xffff'
  595.     `M'
  596.           0, 1, 2, or 3 (shifts for `lea' instruction)
  597.     `G'
  598.           Standard 80387 floating point constant
  599. *Intel 960--`i960.h'*
  600.     `f'
  601.           Floating point register (`fp0' to `fp3')
  602.     `l'
  603.           Local register (`r0' to `r15')
  604.     `b'
  605.           Global register (`g0' to `g15')
  606.     `d'
  607.           Any local or global register
  608.     `I'
  609.           Integers from 0 to 31
  610.     `J'
  611.           0
  612.     `K'
  613.           Integers from -31 to 0
  614.     `G'
  615.           Floating point 0
  616.     `H'
  617.           Floating point 1
  618. *MIPS--`mips.h'*
  619.     `d'
  620.           General-purpose integer register
  621.     `f'
  622.           Floating-point register (if available)
  623.     `h'
  624.           `Hi' register
  625.     `l'
  626.           `Lo' register
  627.     `x'
  628.           `Hi' or `Lo' register
  629.     `y'
  630.           General-purpose integer register
  631.     `z'
  632.           Floating-point status register
  633.     `I'
  634.           Signed 16 bit constant (for arithmetic instructions)
  635.     `J'
  636.           Zero
  637.     `K'
  638.           Zero-extended 16-bit constant (for logic instructions)
  639.     `L'
  640.           Constant with low 16 bits zero (can be loaded with `lui')
  641.     `M'
  642.           32 bit constant which requires two instructions to load (a
  643.           constant which is not `I', `K', or `L')
  644.     `N'
  645.           Negative 16 bit constant
  646.     `O'
  647.           Exact power of two
  648.     `P'
  649.           Positive 16 bit constant
  650.     `G'
  651.           Floating point zero
  652.     `Q'
  653.           Memory reference that can be loaded with more than one
  654.           instruction (`m' is preferable for `asm' statements)
  655.     `R'
  656.           Memory reference that can be loaded with one instruction (`m'
  657.           is preferable for `asm' statements)
  658.     `S'
  659.           Memory reference in external OSF/rose PIC format (`m' is
  660.           preferable for `asm' statements)
  661. *Motorola 680x0--`m68k.h'*
  662.     `a'
  663.           Address register
  664.     `d'
  665.           Data register
  666.     `f'
  667.           68881 floating-point register, if available
  668.     `x'
  669.           Sun FPA (floating-point) register, if available
  670.     `y'
  671.           First 16 Sun FPA registers, if available
  672.     `I'
  673.           Integer in the range 1 to 8
  674.     `J'
  675.           16 bit signed number
  676.     `K'
  677.           Signed number whose magnitude is greater than 0x80
  678.     `L'
  679.           Integer in the range -8 to -1
  680.     `G'
  681.           Floating point constant that is not a 68881 constant
  682.     `H'
  683.           Floating point constant that can be used by Sun FPA
  684. *SPARC--`sparc.h'*
  685.     `f'
  686.           Floating-point register
  687.     `I'
  688.           Signed 13 bit constant
  689.     `J'
  690.           Zero
  691.     `K'
  692.           32 bit constant with the low 12 bits clear (a constant that
  693.           can be loaded with the `sethi' instruction)
  694.     `G'
  695.           Floating-point zero
  696.     `H'
  697.           Signed 13 bit constant, sign-extended to 32 or 64 bits
  698.     `Q'
  699.           Memory reference that can be loaded with one instruction
  700.           (`m' is more appropriate for `asm' statements)
  701.     `S'
  702.           Constant, or memory address
  703.     `T'
  704.           Memory address aligned to an 8-byte boundary
  705.     `U'
  706.           Even register
  707. File: gcc.info,  Node: No Constraints,  Prev: Machine Constraints,  Up: Constraints
  708. Not Using Constraints
  709. ---------------------
  710.    Some machines are so clean that operand constraints are not
  711. required.  For example, on the Vax, an operand valid in one context is
  712. valid in any other context.  On such a machine, every operand
  713. constraint would be `g', excepting only operands of "load address"
  714. instructions which are written as if they referred to a memory
  715. location's contents but actual refer to its address.  They would have
  716. constraint `p'.
  717.    For such machines, instead of writing `g' and `p' for all the
  718. constraints, you can choose to write a description with empty
  719. constraints.  Then you write `""' for the constraint in every
  720. `match_operand'.  Address operands are identified by writing an
  721. `address' expression around the `match_operand', not by their
  722. constraints.
  723.    When the machine description has just empty constraints, certain
  724. parts of compilation are skipped, making the compiler faster.  However,
  725. few machines actually do not need constraints; all machine descriptions
  726. now in existence use constraints.
  727.